<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
        <?php
        $cs = Yii::app()->getClientScript();
        $baseUrl = Yii::app()->request->baseUrl;
        $cs->registerCssFile($baseUrl . '/css/contact.css');
        $cs->registerCssFile($baseUrl . '/css/contact-form.css');
        ?>
    </head>
    <body>
        <div id="body_main">
            <div id="map1">
            </div>
            <div id="contact">
                <h2><?php echo Yii::t('default', 'Register member'); ?></h2>

                <?php if (Yii::app()->user->hasFlash('register')): ?>
                    <div class="flash-success" style="padding-top: 10px;padding-bottom: 10px;">
                        <?php echo Yii::app()->user->getFlash('register'); ?>
                    </div>
                <?php else: ?>
                    <p>

                    </p>
                    <div class="form">
                        <?php
                        $form = $this->beginWidget('CActiveForm', array(
                            'id' => 'register-form',
                            'enableClientValidation' => true,
                            'clientOptions' => array(
                                'validateOnSubmit' => true,
                            ),
                                ));
                        ?>
                        <p class="note"><?php echo Yii::t('default', 'fieldsWith'); ?> <span class="required">*</span> <?php echo Yii::t('default', 'areRequired'); ?>.</p>

                        <?php echo $form->errorSummary($model); ?>

                        <div class="row">
                            <?php echo $form->labelEx($model, 'email'); ?>
                            <?php echo $form->textField($model, 'email', array('size' => 40, 'maxlength' => 255)); ?>
                            <?php echo $form->error($model, 'email'); ?>
                        </div>

                        <div class="row">
                            <?php echo $form->labelEx($model, 'password'); ?>
                            <?php echo $form->passwordField($model, 'password', array('size' => 40, 'maxlength' => 255)); ?>
                            <?php echo $form->error($model, 'password'); ?>
                        </div>
                        
                        <div class="row">
                            <?php echo $form->labelEx($model, 'name'); ?>
                            <?php echo $form->textField($model, 'name', array('size' => 40, 'maxlength' => 255)); ?>
                            <?php echo $form->error($model, 'name'); ?>
                        </div>

                        <div class="row">
                            <?php echo $form->labelEx($model, 'address'); ?>
                            <?php echo $form->textField($model, 'address', array('size' => 40, 'maxlength' => 255)); ?>
                            <?php echo $form->error($model, 'address'); ?>
                        </div>
                        
                        <div class="row">
                            <?php echo $form->labelEx($model, 'phone'); ?>
                            <?php echo $form->textField($model, 'phone', array('size' => 40, 'maxlength' => 255)); ?>
                            <?php echo $form->error($model, 'phone'); ?>
                        </div>

                        <?php if (CCaptcha::checkRequirements()): ?>
                            <div class="row">
                                <?php echo $form->labelEx($model, 'verifyCode'); ?>
                                <div>
                                    <?php $this->widget('CCaptcha'); ?>
                                    <?php echo $form->textField($model, 'verifyCode'); ?>
                                </div>
                                <div class="hint"><?php echo Yii::t('default', 'verifyCodeHelp1'); ?>
                                    <br/><?php echo Yii::t('default', 'verifyCodeHelp2'); ?></div>
                                <?php echo $form->error($model, 'verifyCode'); ?>
                            </div>
                        <?php endif; ?>

                        <div class="row buttons">
                            <?php echo CHtml::submitButton(Yii::t('default', 'Register')); ?>
                        </div>

                        <?php $this->endWidget(); ?>
                    </div><!-- form -->

                <?php endif; ?>
            </div>
        </div>
    </body>
</html>
